import os

# Zope imports
from Globals import package_home

# Five imports
from Products.Five.browser import BrowserView

# iqpp.plone.io imports
from iqpp.plone.io.interfaces import IImport

class ImportView(BrowserView):
    """
    """
    def importObjects(self):
        """
        """
        path = os.path.join(package_home(globals()), '../../../../../data/data.xml')
        IImport(self.context).importObjects(path)
        
        self.request.response.redirect(self.context.absolute_url())